background-color: $osd_bg_color;
padding: $base_padding * 2;
border-radius: $modal_radius;
+ border: 2px solid $hc_inset_color;
+ margin: $base_padding * 3;
}
border-radius: $base_border_radius * 2;
padding: $base_padding;
spacing: $base_padding;
- border: 2px solid transparent;
+ border-width: 2px;
+ border-style: solid;
+ border-color:transparent;
transition-duration: 200ms;
text-align: center;
color: inherit;
}
}
-// tile
+// Helper mixin for button-like elements with an icon
@mixin tile_button($color, $flat: true) {
@extend %tile;
+
+ // focus-color
+ $fc: mix($selected_bg_color, $color, 90%);
+
@if $flat {
background-color: transparent;
+ &:hover { background-color: transparentize($color, .88);}
+ &:highlighted, &:focus {
+ background-color: transparentize($fc, .84);
+ &:hover {
+ background-color: transparentize($fc, .68);
+ }
+ }
} @else {
background-color: transparentize($color, .84);
- @if $is_highcontrast {
- box-shadow: inset 999px 0 0 0 transparentize($color, .2); // bit of a hack
+ &:hover { background-color: transparentize($color, .72);}
+ &:highlighted, &:focus {
+ background-color: transparentize(mix($fc, $color, 20%), .84);
+ &:hover {
+ background-color: transparentize(mix($fc, $color, 20%), .68);
+ }
}
}
- &:hover { background-color: transparentize($color, .9);}
- &:selected, &:focus {
- background-color: transparentize($color, .87);
- &:hover { background-color: transparentize($color, .84);}
- &:active { background-color: transparentize($color, .87);}
- }
- &:active { background-color: transparentize($color, .84);}
- &:outlined, &:checked {
- background-color: transparentize($color, .81);
- &:active { background-color: transparentize($color, .78);}
- &:hover { background-color: transparentize($color, .75);}
- }
- &:drop {
- border: 2px solid transparentize($selected_bg_color, .2); //already 2px transparent so no jumping
- background-color: transparentize($selected_bg_color, .8);
- }
-}
-// overview icon, dash, app grid
-@mixin overview_icon($color, $flat: true) {
- transition-duration: 400ms;
- .overview-icon {
- @extend %tile;
+ // bit of a hack to have nice high contrast
+ @if $is_highcontrast {
+ @if $flat {
+ &:hover {
+ box-shadow: inset 999px 0 0 0 transparentize($color, .92);
+ }
+ &:highlighted, &:focus {
+ box-shadow: inset 999px 0 0 0 transparentize($fc, .8);
+ }
+ } @else {
+ box-shadow: inset 999px 0 0 0 transparentize($color, .92);
+ border-color: transparentize($color, .44);
+ &:highlighted, &:focus {
+ box-shadow: inset 999px 0 0 0 transparentize($fc, .8);
+ }
+ }
}
- @if $flat {
- .overview-icon { background-color: transparent;}
- } @else {
- .overview-icon { background-color: transparentize($color, .93); }
+
+ &:highlighted, &:focus {
+ border-color: transparentize($fc, .3);
}
- &:hover .overview-icon { background-color: transparentize($color, .87);}
- &:selected .overview-icon,
- &:focus .overview-icon {
- background-color: transparentize($color, .87);
- &:hover .overview-icon { background-color: transparentize($color, .84);}
- &:active .overview-icon { background-color: transparentize($color, .87);}
+ &:active {
+ background-color: transparentize($color, .76);
+ &:focus {
+ background-color: transparentize($fc, .68);
+ }
}
- &:active .overview-icon { background-color: transparentize($color, .84);}
- &:outlined .overview-icon,
- &:checked .overview-icon {
+
+ &:selected,
+ &:checked {
background-color: transparentize($color, .81);
- &:active .overview-icon { background-color: transparentize($color, .78);}
- &:hover .overview-icon { background-color: transparentize($color, .75);}
+ &:active { background-color: transparentize($color, .78);}
+ &:hover { background-color: transparentize($color, .75);}
}
- &:drop .overview-icon {
- border: 2px solid transparentize($selected_bg_color, .2); //already 2px transparent so no jumping
+
+ &:drop {
+ border-color: transparentize($selected_bg_color, .2);
background-color: transparentize($selected_bg_color, .8);
}
}
$active_fg_color: if($variant=='light', darken($fg_color, 10%), lighten($fg_color, 22%));
// inset colour for high contrast
-$hc_inset_color: transparentize($fg_color, 0.7);
+$hc_inset_color: transparentize($fg_color, 0.6);
/* App Icons */
-// Icon tiles in the app grid
-.app-well-app {
- @include overview_icon($system_fg_color);
+// items in the app grid and dash
+.overview-tile {
+ @include tile_button($system_fg_color);
+ // override the %tile style
+ border-radius: $base_border_radius*3;
+ padding: $base_padding * 2;
+
+ // the icon itself
.overview-icon {
- padding: $base_padding * 2;
- border-radius: $base_border_radius * 3;
- color: $system_fg_color;
- }
- .overview-icon.overview-icon-with-label {
- > StBoxLayout {
- spacing: $base_padding;
+ // item with a label
+ &.overview-icon-with-label {
+ > StBoxLayout {
+ spacing: $base_padding;
+ }
}
}
}
// app folders
-.app-well-app.app-folder {
- @include overview_icon($system_fg_color, $flat: false);
+.app-folder {
+ @include tile_button($system_fg_color, $flat: false);
+}
+
+// Running app indicator (also shown in dash)
+.app-grid-running-dot {
+ height: 5px;
+ width: 5px;
+ border-radius:5px;
+ background-color: $system_fg_color;
+ margin-bottom: 2px;
+ @if $is_highcontrast {
+ margin-bottom: 4px;
+ }
}
// expanded folder
height: 720px;
}
-// Running app indicator (also shown in dash)
-.app-well-app-running-dot {
- height: 5px;
- width: 5px;
- border-radius:5px;
- margin-bottom: 8px;
- background-color: $system_fg_color;
-}
// Rename popup for app folders
.rename-folder-popup {
}
}
+// page navigation
.page-navigation-hint {
&.dnd {
background: rgba(255, 255, 255, 0.1);
$dash_background_color: $system_overlay_bg_color;
$dash_placeholder_size: 32px;
-$dash_padding: $base_padding * 2; // 12px
+$dash_padding: $base_padding * 1.5;
+$dash_edge_offset: $base_margin * 3;
$dash_border_radius: $modal_radius + $dash_padding;
// container for the dash
#dash {
- @extend %caption;
- margin-top: $dash_padding;
+ margin-top: $dash_edge_offset;
- .placeholder {
- // background-image: url("resource:///org/gnome/shell/theme/dash-placeholder.svg");
- background-image:none;
- background-size: contain;
- height: $dash_placeholder_size;
- }
+ // background behind item container
+ .dash-background {
+ background-color: $dash_background_color;
+ border-radius: $dash_border_radius;
+ border: 2px solid transparent;
+ padding: $dash_padding * 2 $dash_padding; // padding is uneven
- .empty-dash-drop-target {
- width: $dash_placeholder_size;
- height: $dash_placeholder_size;
+ @if $is_highcontrast {
+ border-color: $hc_inset_color;
+ }
}
- // Running app indicator (also shown in app grid)
- .app-well-app-running-dot {
- margin-bottom: 14px; // hardcoded
- }
-}
+ // items on the dash
+ .dash-item-container {
-// background of the dash behind app icons
-.dash-background {
- background-color: $dash_background_color;
- border-radius: $dash_border_radius;
- padding: $dash_padding;
- spacing: $base_padding;
- margin-bottom: $dash_padding;
+ .placeholder {
+ // background-image: url("resource:///org/gnome/shell/theme/dash-placeholder.svg");
+ background-image: none;
+ background-size: contain;
+ height: $dash_placeholder_size;
+ }
- @if $is_highcontrast {
- border: 2px solid $hc_inset_color;
- box-shadow:none;
- }
-}
+ .empty-dash-drop-target {
+ width: $dash_placeholder_size;
+ height: $dash_placeholder_size;
+ }
+
+ // app icons
+ .overview-tile {
+ // inherits styles from _app-grid.css
+ }
-// items on the dash
-.dash-item-container {
- > * {margin: 0 2px;}
- &:ltr{&:first-child {margin-left: 0;}}
- &:rtl{&:first-child {margin-right: 0;}}
+ // button to show app grid
+ .show-apps {
+ @include tile_button($system_fg_color);
+ }
- // each app item on the dash
- .app-well-app .overview-icon {
- padding: $base_padding;
- border-radius: $base_border_radius * 2;
+ .show-apps, .overview-tile {
+ margin: $base_margin * 0.5;
+ padding: $base_padding;
+ border-radius: $base_border_radius * 2;}
}
- // show apps button
- .show-apps { @include overview_icon($system_fg_color);}
+ // separator between pinned and running apps
+ .dash-separator {
+ width: 1px;
+ margin-left:$base_margin;
+ margin-right:$base_margin;
+ background-color: $system_borders_color;
- .show-apps, .app-well-app {
- padding-bottom: $dash_padding;
- color: $system_fg_color;
+ @if $is_highcontrast {
+ width: 2px;
+ background-color: $hc_inset_color;
+ }
}
-}
-// separator between favourites and running apps
-.dash-separator {
- width: 1px;
- margin: 0 $base_margin;
- background-color: $system_borders_color;
- margin-bottom: $dash_padding;
- @if $is_highcontrast {
- width: 2px;
+ // make sure all dash components have same margin from screen edge
+ .dash-separator,
+ .dash-background,
+ .dash-item-container {
+ margin-bottom: $dash_edge_offset;
}
}
border-radius: $modal_radius * 1.5;
padding: $base_padding * 2;
margin:0 $base_margin * 3;
+ border: 2px solid transparent;
+ @if $is_highcontrast {
+ border-color: $hc_inset_color;
+ }
}
%search_section_content_item {
// Search results with icons
.grid-search-result {
- @extend .app-well-app;
+ @extend .overview-tile;
}
// search result provider
// list item title (with leading icon)
.list-search-result-title {
spacing: $base_padding * 2;
- // font-weight: bold;
+
+ @if $is_highcontrast {
+ font-weight: bold;
+ }
}
// list item description
.list-search-result-description {
color: $system_insensitive_fg_color;
+
+ @if $is_highcontrast {
+ color: $system_fg_color;
+ }
}
}
$switcher_padding: $base_padding * 2;
$switcher_radius: $modal_radius + $switcher_padding;
-
// the full screen container of the switcher
.switcher-popup {
padding: 0;
// each item in the list
.item-box {
@include tile_button($osd_fg_color);
- // override over style so mouse doesn't steal focus
+ // override %tile style so mouse doesn't steal focus
&:hover {background: none;}
- @if $is_highcontrast {
- box-shadow: inset 0 0 0 999px transparentize($hc_inset_color,0.2);
- }
}
.separator {
}
@if $is_highcontrast {
- border:2px solid $outer_borders_color;
+ border:2px solid $hc_inset_color;
}
}
}, class FolderIcon extends AppViewItem {
_init(id, path, parentView) {
super._init({
- style_class: 'app-well-app app-folder',
+ style_class: 'overview-tile app-folder',
button_mask: St.ButtonMask.ONE,
toggle_mode: true,
can_focus: true,
const expandTitleOnHover = appIconParams['expandTitleOnHover'];
delete iconParams['expandTitleOnHover'];
- super._init({style_class: 'app-well-app'}, isDraggable, expandTitleOnHover);
+ super._init({style_class: 'overview-tile'}, isDraggable, expandTitleOnHover);
this.app = app;
this._id = app.get_id();
this._iconContainer.add_child(this.icon);
this._dot = new St.Widget({
- style_class: 'app-well-app-running-dot',
+ style_class: 'app-grid-running-dot',
layout_manager: new Clutter.BinLayout(),
x_expand: true,
y_expand: true,
x_align: Clutter.ActorAlign.CENTER,
y_align: Clutter.ActorAlign.END,
});
+ this._dot.translationY = 8;
this._iconContainer.add_child(this._dot);
this.label_actor = this.icon.label;
this.destroy_all_children();
this.child = actor;
- this.child.y_expand = true;
+ this.child.y_expand = false;
this.add_child(this.child);
}
highlight(index, justOutline) {
if (this._items[this._highlighted]) {
- this._items[this._highlighted].remove_style_pseudo_class('outlined');
this._items[this._highlighted].remove_style_pseudo_class('selected');
+ this._items[this._highlighted].remove_style_pseudo_class('highlighted');
}
if (this._items[index]) {
if (justOutline)
- this._items[index].add_style_pseudo_class('outlined');
- else
this._items[index].add_style_pseudo_class('selected');
+ else
+ this._items[index].add_style_pseudo_class('highlighted');
}
this._highlighted = index;